package Practice;

import java.util.Scanner;

public class JInJIn {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int money = 0;
        int deposit = 0;
        int cost;
        for (int i = 1; i <= 12; i++) {
            money += 300;
            cost = sc.nextInt();
            money -=cost;
            if (money<0){
                System.out.println("-"+ i);
                return;
            }
            if (money>100){
                int num = money/100;
                money -= 100*num;
                deposit += 100*num;
            }
        }
        money += deposit*6/5;
        System.out.println(money);

    }
}
